﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Interfaces;
using dto;
using Model;

namespace Controller
{
    public class Controller : IController
    {
       private IView view;
       private IModel model;
        
        
        void IController.initialize(IView view)
        {
            this.view = view;
        }


      


        void IController.sendMessage(string p)
        {
            view.sendMessage(p);
        }


        void IController.start(int populationSize, int maxGenerations, Selection globaldtoSelection, Crossover globaldtoCrossover, FitnessFunktion globaltoFitnessFunktion, ChromosomType globaltoChromosomType, double MutationRate, bool GenerationDependance, double crossoverrate, int chromosomesize)
        {
            this.model = new Model.Model(populationSize, maxGenerations, globaldtoSelection, globaldtoCrossover, globaltoFitnessFunktion, globaltoChromosomType, MutationRate, GenerationDependance,crossoverrate,chromosomesize);
            model.MVC(this);
            model.doEvolution();
        }
    }
}
